The invention generally relates to redirecting an application program to the source of an HTML object that is stored in an alternative source file, and more specifically relates to embedding a redirection tag within an HTML data object that points to the underlying source of the HTML data object stored in an alternative source file.
The file format known as xe2x80x9cHypertext Markup Languagexe2x80x9d (HTML), which is used for developing Web pages, is optimized for displaying data objects and not describing the underlying data format associated with the data object. Therefore, even though the data object is visible to the user in the Web page, application programs that wish to make use of the data object displayed on the Web page may have trouble interpreting the data. This is due to the fact that application programs are unable to interpret the context of how data is used in a Web page because HTML does not define the xe2x80x9cdata typexe2x80x9d of the data objects. For example, a character string may be displayed in an HTML document as xe2x80x9c3-9-00.xe2x80x9d The character string may represent a number, a date, an identification number, or a part of a larger number within the document. Because the character string is stored in HTML format in the Web page, the application program in which the character string is to be imported may not be able to interpret the character string correctly. For instance, if the character string is imported into a spreadsheet program, the spreadsheet program may interpret the character string xe2x80x9c3-9-00xe2x80x9d as a date, when the character string may actually be an identification number. Therefore, the meaning of the data would be misinterpreted by the spreadsheet program, which may lead to a result that is different from what the user expects.
Another problem encountered with importing data from an HTML document into an application program is that the information displayed in the HTML document may only be a subset of the actual data. Typically, the Internet""s bandwidth and response time limit the amount of data that may be transferred at any given time. Therefore, large amounts of data may be broken down into smaller subsets, or xe2x80x9cpagesxe2x80x9d of data to be downloaded separately. For example, suppose a user wishes to search the Internet for all sites that include information about snow skiing. When the search is complete, the number of xe2x80x9chits,xe2x80x9d or sites relating to snow skiing that the search uncovered may be too large to present to the user at one time on a single Web page. Therefore, the results of the search may be stored at a remote server. The search results would then be parsed into multiple xe2x80x9cpages,xe2x80x9d with each page containing a predefined number of sites. The xe2x80x9cpagesxe2x80x9d may then be displayed one at a time to the user. However, if the user wanted to import the entire search results into an application program, such as a spreadsheet or database, the user would typically have to load each page individually and save the contents separately. Depending on the size of the search results, this process would be tedious and time consuming, which can lead to errors and frustration on the part of the user.
Thus, there is a general need in the art for an improvement to the HTML file structure to allow data objects in an HTML document to be imported into application programs, such that the original context, or data type, of the data object is preserved. There is a still a further need in the art for a method of redirecting application programs to an alternative location to retrieve the underlying data associated with the data objects displayed in the HTML document.
Generally described, the invention meets the above-described needs by providing a custom attribute that is added to the standard HTML file format. The custom attribute redirects an application program to an alternative location where the underlying data associated with a data object displayed on the Web page is stored. The custom attribute comprises a redirection attribute. The redirection attribute is placed within a specific HTML data object tag. The redirection attribute indicates that the data object tag has associated underlying data stored at an alternative location. The redirection attribute contains a connection string, or URL, that points to the alternative location where the underlying data is stored.
More specifically, the invention also describes a method of redirecting an application program to an alternative location to retrieve at least one data object stored at the alternative location in an alternative source file. First, a user command is received, selecting at least one data object that is displayed in the HTML document to be imported into the application program. Next, the data object tag associated with the data object that the user specified to import is retrieved. The data object tag is then examined to determine whether the redirection attribute exists. If the redirection attribute exists, it is retrieved. The connection string that points to the alternative location where the data object is stored is retrieved from the redirection attribute and the alternative location is accessed. Next, the underlying data associated with the data object and stored in an alternative file format is retrieved from the alternative site and imported into the application program. However, if the data object tag does not contain the redirection attribute, then the data object displayed in the HTML document is imported directly into the application program.
The invention may also determine whether more than one instance of tabular data is selected. If more than one instance of tabular data is selected, then the redirection attribute is ignored and the data is imported directly from the HTML document in the HTML file format. However, if only one instance of tabular data is selected then the HTML tag is retrieved and the determination is made whether the redirection attribute is present. It should be noted that limiting the redirection tag to import only a single instance of tabular data is due to the limitation of the MICROSOFT EXCEL spreadsheet program. Currently, the MICROSOFT EXCEL spreadsheet program does not have the ability to import multiple instances of data from an alternate source into a single worksheet. The invention has the ability to import data from the source instead of the HTML document, no matter how many objects are selected.
Yet another aspect of the invention is to determine whether the redirection attribute has been disabled. If the redirection attribute has not been disabled, then the connection string is retrieved and the alternative location is opened. However, if the data object tag does not contain the connection string or the redirection attribute is disabled, then the data object displayed in the HTML document is imported directly into the application program in HTML format.
That the invention improves over the drawbacks of the current HTML file structure to allow data objects in an HTML document to be imported into application programs, such that the original file format, or data type of the data object is preserved and provides a method for redirecting an application to an alternative source file that contains the underlying data displayed in the HTML document and accomplishes the advantages described above will become apparent from the following detailed description of the exemplary embodiments and the appended drawings and claims.